﻿/// <reference path="jquery-1.6.4.min.js" />
/// <reference path="CommonFunction.js" />

function GetDrug(objDrugId) {
    var requestdata = JSON.stringify({ drugId: objDrugId });
    $.ajax({
        type: "POST",
        url: "DrugServices.asmx/GetFromMasterList",
        data: requestdata,
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        success: function(response) {
            var drug = response.d;
            $("#UnitResult").text(drug.Unit);
            $("#CostPriceResult").text(CommaFormatted(drug.CostPrice,0));
        }
    });
}



function DeleteRow(obj, detailId) {
    var requestdata = JSON.stringify({ GrnDetailId: detailId });
    $.ajax({
            type: "POST",
            url: "ImportAdjustEdit.aspx/DeleteGrnDetail",
            data: requestdata,
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            success: function() {
                $(obj).closest("tr").fadeOut(1000);
            }
        });
}